<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
request.setCharacterEncoding("utf-8");
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<base href="<%=basePath%>" />
<jsp:include page="/jsp/admin/common.jsp" />
<jsp:include page="/jsp/tableHead.jsp" />
<script type="text/javascript">
$().ready(function(){

	var option = {
			head : [
					{name:"code",title:"编号",width:150},
		            {name:"name",title:"名称",width:200},
		            {name:"category",title:"商品分类",width:80},
		            {name:"enter_price",title:"成本价",width:80},
		            {name:"price",title:"销售价",width:80},
		            {name:"market_price",title:"市场价",width:80},
		            {name:"count",title:"库存",width:80},
		            {name:"is_marketable",title:"是否上架",width:80},
		            {name:"modify_date",title:"修改日期",width:150},
		            {name:"operation",title:"操作",width:100}
		            ],//表格标题定义 
            addURL : "<%=basePath %>admin/product_edit.do",
            searchURL : "<%=basePath %>admin/product_list.do",
            editURL : "<%=basePath %>admin/product_edit.do",
            deleteURL : "<%=basePath %>admin/product_delete.do",
            execCmd : function(){
                this.$table.orderBy("modify_date","DESC");
       			this.queryFn();
   			}
	};
	initTable(option);
});
</script>
</head>
<body>
<div class="path">
	<a href="">首页</a> &raquo; 商品列表<span>(共<span id="pageTotal"></span>条记录)</span>
</div>
<div class="bar">
	<jsp:include page="../search.jsp">
		<jsp:param value="name,名称,LIKE,true" name="searchKey"/>
		<jsp:param value="code,编号,EQUAL" name="searchKey"/>
	</jsp:include>
</div>
<table id="listTable" class="list">
</table>
</body>
</html>